import React, { lazy } from 'react'
import {
  HomeOutlined,
  PictureOutlined,
  MenuOutlined,
  PicLeftOutlined,
  SwapLeftOutlined,
  BorderTopOutlined,
  ClockCircleOutlined,
  UserOutlined,
  AppstoreOutlined
} from '@ant-design/icons'
const menus = [
  { 
    path: '/',
    key: '/',
    redirect: '/home',
    meta: { // 该路由不出现在左侧菜单栏
      hidden: true
    }
  },
  {
    path: '/home',
    key: '0-0',
    title: '系统首页',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/home/Index'))
  },
  {
    path: '/bannermanager',
    key: '0-1',
    title: '轮播图管理',
    icon: <PictureOutlined />,
    redirect: '/bannermanager/list',
    children: [
      {
        path: '/bannermanager/list',
        key: '0-1-0',
        title: '轮播图列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Index'))
      },
      {
        path: '/bannermanager/add',
        key: '0-1-1',
        title: '添加轮播图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Add')),
        meta: {
          hidden: true
        }
      }
    ]
  },
  {
    path: '/navigatormanager',
    key: '0-2',
    title: '快捷导航管理',
    icon: <PicLeftOutlined />,
    redirect: '/navigatormanager/list',
    children: [
      {
        path: '/navigatormanager/list',
        key: '0-2-0',
        title: '导航列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/navigator/List'))
      },
      {
        path: '/navigatormanager/category',
        key: '0-2-1',
        title: '导航分类',
        icon: <SwapLeftOutlined />,
        component: lazy(() => import('./../views/navigator/Category'))
      },
      {
        path: '/navigatormanager/hlist',
        key: '0-2-2',
        title: '首页导航',
        icon: <BorderTopOutlined />,
        component: lazy(() => import('./../views/navigator/HomeList'))
      }
    ]
  },
  {
    path: '/hmanager',
    key: '0-3',
    title: '首页数据管理',
    icon: <ClockCircleOutlined />,
    redirect: '/hmanager/seckilllist',
    children: [
      {
        path: '/hmanager/seckilllist',
        key: '0-3-0',
        title: '首页秒杀列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/homeData/homeseckill'))
      },
      {
        path: '/hmanager/recommentlist',
        key: '0-3-1',
        title: '首页推荐列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/homeData/homerecommend'))
      }
    ]
  },
  {
    path: '/usermanager',
    key: '0-4',
    title: '用户管理',
    icon: <UserOutlined />,
    redirect: '/usermanager/list',
    children: [
      {
        path: '/usermanager/list',
        key: '0-4-0',
        title: '用户列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/List'))
      },
      {
        path: '/usermanager/register',
        key: '0-4-1',
        title: '注册用户',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/RegisterUser'))
      },
      {
        path: '/usermanager/adminlist',
        key: '0-4-2',
        title: '管理员列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/AdminList'))
      },
    ]
  },
  {
    path: '/productmanager',
    key: '0-5',
    title: '商品管理',
    icon: <AppstoreOutlined />,
    redirect: '/productmanager/list',
    children: [
      {
        path: '/productmanager/list',
        key: '0-5-0',
        title: '商品列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/product/List'))
      },
      {
        path: '/productmanager/sortlist',
        key: '0-5-1',
        title: '筛选商品',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/product/SortList'))
      },
    ]
  },
  {
    path: '/theoryTest',
    key: '0-5',
    title: '理论考试',
    icon: <AppstoreOutlined />,
    redirect: '/theoryTest/amount',
    children: [
      {
        path: '/theoryTest/amount',
        key: '0-6-0',
        title: '试卷数量',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/theoryTest/amount'))
      },
      {
        path: '/theoryTest/theoyTextstate',
        key: '0-6-1',
        title: '考试状态',
        icon: <MenuOutlined />,
        component: lazy(() => import('../views/theoryTest/theoyTextstate'))
      },
    ]
  },

  {
    path: '/setting',
    key: '0-7',
    title: '设置',
    icon: <MenuOutlined />,
    component: lazy(() => import('../views/setting/Index')),
    meta: { // 该路由不出现在左侧菜单栏
      hidden: true
    }
  }
]

export default  menus